<template>
 
</template>

<script>
	export default {
		data() {
			return {
				info:{
					type:"alert",//alert:单按钮,confirm:双按钮
					title:"",//
					content:"",
					cancelText:"取消",
					confirmText:"确定",
					isMaskClose:"1",//1点击遮罩层关闭弹窗
				}
			}
		},
		onLoad(info={}) {
			console.log("555: " + JSON.stringify(555));
			this.info = {...this.info,...info};
		},
		methods: {
			itemClick(type){
				if(type=="mask"&&this.info.isMaskClose!='1'){
					return;
				}
				uni.navigateBack()
				uni.$emit("wujw_common_dialog",type);
			}
		}
	}
</script>

<style lang="scss">
	$btncolor:#fa4037;
	page {
		background: transparent;
	}
	.mask-content {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		display: flex;
		justify-content: center;
		align-items: center;
		background-color: rgba(0, 0, 0, 0.4);
		.dialog-content {
			background-color: #FFFFFF;
			width: 580px;
			border-radius: 10rpx;
			.head-content{
				display: flex;
				align-items: center;
				justify-content: center;
				color: #343434;
				font-weight: bold;
				font-size: 32rpx;
				padding: 20rpx 30rpx;
			}
			.main-content{
				max-height: 580px;
				width: 600px;
				.info-content{
					min-height: 80rpx;
					padding: 10rpx 30rpx;
					color: #636463;
					font-size: 30rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}
			.foot-content{
				display: flex;
				justify-content: center;
				align-items: center;
				height: 110rpx;
				.btn{
					font-size: 28rpx;
					border-radius: 66rpx;
					height: 66rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}
				&.alert{
					.btn{
						background-color: $btncolor;
						color: #FFFFFF;
						font-size: 28rpx;
						border-radius: 60rpx;
						height: 66rpx;
						width: 300rpx;
						padding:  0 40rpx;
						display: flex;
						justify-content: center;
						align-items: center;
					}
				}
				&.confirm{
					justify-content: space-around;
					.btn{
						min-width: 230rpx;
						&.active{
							background-color: $btncolor;
							color: #FFFFFF;
						}
						&.cancel{
							border: 1rpx solid $btncolor;
							color: $btncolor;
							border-radius: 66rpx;
						}
					}
				}
				
			}
		}
	}

	

	
</style>
